<template>
  <el-card class="card-box" :body-style="{ padding: '0px' }" shadow="always">
    <div class="card-img">
      <el-image style="width:100%; height: 100%;" :src="item.img" fit="cover" lazy>
        <div slot="placeholder" class="image-slot">
          加载中
          <span class="dot">...</span>
        </div>
        <div slot="error" class="image-slot">
          <i class="el-icon-picture-outline"></i>
        </div>
      </el-image>
    </div>
    <div style="padding: 15px 16px;">
      <p class="tc title">{{item.name}}</p>
      <p class="tc des">{{item.start_time}}—{{item.end_time}}</p>
      <p class="tc des">{{item.organizers}}</p>
      <div class="bottom clearfix">
        <el-row>
          <el-col :span="12">
            <span class="highlight">{{item.nums}}</span>
            <span>预计参加企业</span>
          </el-col>
          <el-col class="tr" :span="12">
            <span class="highlight">{{item.stu_numb}}</span>
            <span>预计参加学生</span>
          </el-col>
        </el-row>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  name: "card-box",
  props: {
    item: {
      typeof: Object
    }
  }
};
</script>

<style lang="scss" scoped>
.card-box {
  margin-bottom: 20px;

  &:hover {
    -webkit-box-shadow: 5px 10px 10px 5px rgba(0, 0, 0, 0.1);
    box-shadow: 5px 10px 10px 5px rgba(0, 0, 0, 0.1);
  }

  p {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .card-img {
    height: 166px;
    margin-bottom: 15px;
  }

  .title {
    font-weight: bold;
    color: #333;
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 5px;
  }

  .des {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
    font-weight: bold;
  }

  .bottom {
    border: 1px solid rgba(243, 243, 243, 1);
    height: 32px;
    line-height: 32px;
    padding: 0 15px;

    span {
      color: #999;
      font-size: 12px;
    }

    .highlight {
      color: #0080ff;
      font-size: 14px;
      font-weight: bold;
    }
  }

  .image-slot {
    height: 100%;
    text-align: center;
    font-size: 20px;
    background-color: #F5F7FA;
  }
}
</style>
